package com.itheima.zy;


import java.util.Random;

public class Test10 {
    public static void main(String[] args) {




        int[] a = new int[5];
        Random rand = new Random();

        int max = 0;
        for (int i = 0; i < a.length; i++) {
            a[i] = rand.nextInt(10) + 1;
            System.out.println(a[i]);
            max += a[i];

        }
        System.out.println(max);


    }
}
